-- GENERATED SPELL FOR [Vekniss Hive Crawler] --


function spell0_15240(pUnit, Event) --@Crippling Poison,n/a--
pUnit:FullCastSpellOnTarget(25809,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_15240', 12336, 1)
end

function spell1_15240(pUnit, Event) --@Mind-numbing Poison,n/a--
pUnit:FullCastSpellOnTarget(25810,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_15240', 12275, 1)
end

function spell2_15240(pUnit, Event) --@Poison Bolt,n/a--
pUnit:FullCastSpellOnTarget(26601,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_15240', 10000, 1)
end

function spell3_15240(pUnit, Event) --@Sunder Armor,n/a--
pUnit:FullCastSpellOnTarget(25051,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_15240', 20286, 1)
end

function Sorts_15240(pUnit, Event)
local choix_sorts_15240 = math.random(0, 3)
if choix_sorts_15240 == 0 then
pUnit:RegisterEvent('spell0_15240', 1, 1)
end
if choix_sorts_15240 == 1 then
pUnit:RegisterEvent('spell1_15240', 1, 1)
end
if choix_sorts_15240 == 2 then
pUnit:RegisterEvent('spell2_15240', 1, 1)
end
if choix_sorts_15240 == 3 then
pUnit:RegisterEvent('spell3_15240', 1, 1)
end
end

function mob15240_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_15240', math.random(1500, 3000), 1)
end

function mob15240_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob15240_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob15240_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(15240, 1, 'mob15240_Action')
RegisterUnitEvent(15240, 2, 'mob15240_Leave')
RegisterUnitEvent(15240, 3, 'mob15240_Kill')
RegisterUnitEvent(15240, 4, 'mob15240_Die')
